<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="../common/baseCss.jsp" %>
<title>编辑用户</title>
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-user-edit">
		<input type="hidden" name="uid" id="uid" value="${user.uid}">
		<input type="hidden" id="oriUname" value="${user.uname}">
		<input type="hidden" id="oriPhone" value="${user.phone}">
		<input type="hidden" id="oriEmail" value="${user.email}">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">
				<span class="c-red">*</span>昵称：
			</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="${user.uname}" id="uname" name="uname">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">手机：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="${user.phone}" id="phone" name="phone">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">电子邮箱：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="${user.email}" placeholder="@" name="email" id="email">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">非身份认证角色:</label>
			<div class="formControls col-xs-8 col-sm-9">
				<dl class="permission-list">
					<dd id="roles">
						<dl class="cl permission-list2" style="border-bottom: none">
							<c:forEach items="${roles}" varStatus="num" var="role">
								<dt style="width: 130px;">
									<c:choose>
										<c:when test="${rleIds[num.index] == 1}">
											<input type="checkbox" checked="checked" name="rleIds" value=${role.rleId}>${role.rleName}
									</c:when>
										<c:otherwise>
											<input type="checkbox" name="rleIds" value=${role.rleId}>${role.rleName}
									</c:otherwise>
									</c:choose>
								</dt>					
							</c:forEach>
						</dl>
					</dd>
				</dl>
			</div>

		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

<%@ include file="../common/baseJs.jsp" %>
<script type="text/javascript" src="manager/js/user/user_edit.js"></script>
</body>
</html>